/*
 * @Author: Zeratul
 * @Date: 2020-08-28 13:22:50
 * @LastEditTime: 2020-08-28 16:40:39
 * @FilePath: \sz-h5-2003-react-mobile\zhangminhui\eleme-react\eleme-user\src\components\ChatMessage\index.js
 */
import React, { Component } from 'react';
import Lazy from "../../utils/imgLazyLoad"

import styles from './index.module.scss'
export default class ChatMessage extends Component {
    constructor(props){
        super(props)
        console.log(props)
    }
    render() {
        return (
            <div className={`${styles.chatMessage} ${styles[this.props.chatMes.direction]}`}>
                <div className={styles.headImg}>
                    <Lazy className={styles["pic"]} src={this.props.chatMes.img} alt={"picerror"}></Lazy>
                </div>
                <div className={styles.chatMessageText}>
                    {this.props.chatMes.message}
                </div>
            </div>
        )
    }
}
